//-------------------------------------------------------------------------------------------------------
// VST Plug-Ins SDK
// Version 2.4		<DATE>
//
// Category     : VST 2.4 effect
// Filename     : <project_name>.cpp
// Created by   : <author>
// Description  : <description>
//
//-------------------------------------------------------------------------------------------------------

#include "<project_name>.h"

//-------------------------------------------------------------------------------------------------------
AudioEffect* createEffectInstance (audioMasterCallback audioMaster)
{
	return new <Project_name>(audioMaster);
}

//-------------------------------------------------------------------------------------------------------
<Project_name>::<Project_name> (audioMasterCallback audioMaster)
: AudioEffectX (audioMaster, 1, 1)	// 1 program, 1 parameter only
{
	setNumInputs (2);		// stereo in
	setNumOutputs (2);		// stereo out
	setUniqueID ('<Project_name>');	// identify
	canProcessReplacing ();	// supports replacing output
	canDoubleReplacing ();	// supports double precision processing
	vst_strncpy (programName, "Default", kVstMaxProgNameLen);	// default program name
	
	//declare your effect parameters here
}

//-------------------------------------------------------------------------------------------------------
<Project_name>::~<Project_name> ()
{
	// nothing to do here
}

//-------------------------------------------------------------------------------------------------------
void <Project_name>::setProgramName (char* name)
{
	vst_strncpy (programName, name, kVstMaxProgNameLen);
}

//-----------------------------------------------------------------------------------------
void <Project_name>::getProgramName (char* name)
{
	vst_strncpy (name, programName, kVstMaxProgNameLen);
}

//-----------------------------------------------------------------------------------------
void <Project_name>::setParameter (VstInt32 index, float value)
{
	//TODO
}

//-----------------------------------------------------------------------------------------
float <Project_name>::getParameter (VstInt32 index)
{
	//TODO
}

//-----------------------------------------------------------------------------------------
void <Project_name>::getParameterName (VstInt32 index, char* label)
{
	//vst_strncpy (label, "Gain", kVstMaxParamStrLen);
	//TODO
}

//-----------------------------------------------------------------------------------------
void <Project_name>::getParameterDisplay (VstInt32 index, char* text)
{
	//dB2string (fGain, text, kVstMaxParamStrLen);
	//TODO
}

//-----------------------------------------------------------------------------------------
void <Project_name>::getParameterLabel (VstInt32 index, char* label)
{
	//vst_strncpy (label, "dB", kVstMaxParamStrLen);]
	//TODO
}

//------------------------------------------------------------------------
bool <Project_name>::getEffectName (char* name)
{
	vst_strncpy (name, "<Project_name>", kVstMaxEffectNameLen);
	return true;
}

//------------------------------------------------------------------------
bool <Project_name>::getProductString (char* text)
{
	vst_strncpy (text, "Gain", kVstMaxProductStrLen);
	return true;
}

//------------------------------------------------------------------------
bool <Project_name>::getVendorString (char* text)
{
	vst_strncpy (text, "<vendor>", kVstMaxVendorStrLen);
	return true;
}

//-----------------------------------------------------------------------------------------
VstInt32 <Project_name>::getVendorVersion ()
{ 
	return <version>; 
}

//-----------------------------------------------------------------------------------------
void <Project_name>::processReplacing (float** inputs, float** outputs, VstInt32 sampleFrames)
{
    float* in1  =  inputs[0];
    float* in2  =  inputs[1];
    float* out1 = outputs[0];
    float* out2 = outputs[1];

	//TODO, currently does nothing
    while (--sampleFrames >= 0)
    {
        (*out1++) = (*in1++);
        (*out2++) = (*in2++);
    }
}

//-----------------------------------------------------------------------------------------
void <Project_name>::processDoubleReplacing (double** inputs, double** outputs, VstInt32 sampleFrames)
{
    double* in1  =  inputs[0];
    double* in2  =  inputs[1];
    double* out1 = outputs[0];
    double* out2 = outputs[1];

	//TODO, currently does nothing
    while (--sampleFrames >= 0)
    {
        (*out1++) = (*in1++);
        (*out2++) = (*in2++);
    }
}
